package cn.nnxy.zentao.controller;


import cn.nnxy.zentao.domain.List1User;
import cn.nnxy.zentao.service.List1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("adduser")
public class AddControllelr {

    @Autowired
    private List1 list1;


    @GetMapping("adds")
    public String  AddUser(){
        return "add";
    }

    @PostMapping("addy")//添加
    public String  AddUser(List1User user){
        list1.queryAdd(user);
        return "redirect:/back/user/userList";
    }

}
